package com.smartum.mpr.model;

public class Token extends Identify {

	private static final long serialVersionUID = 1L;

	private String token;
	private User user;

	public Token() {

	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	@Override
	public Long getId() {
		if (user != null) {
			return user.getId();
		} else {
			return super.getId();
		}
	}

}
